package com.github.xuemingyu.springboot.jkfaststart.controller.admin.view.role;

import com.bidanet.springmvc.demo.jkbuilder.annotation.*;
import com.bidanet.springmvc.demo.jkbuilder.annotation.ext.JkCheckBoxFormField;
import com.bidanet.springmvc.demo.jkbuilder.annotation.type.JkSourceType;
import com.bidanet.springmvc.demo.jkbuilder.annotation.type.JkVerifyType;
import com.bidanet.springmvc.demo.jkbuilder.type.impl.HiddenFormFieldImpl;
import com.github.xuemingyu.springboot.jkfaststart.controller.datasource.ChildrenMenuDataSource;
import lombok.Data;

import java.util.List;

@Data
@JkForm(url = "./updatePermission")
public class EditPermission {
    @JkFormField(type = HiddenFormFieldImpl.class)
    private Long id;
    @JkSortIndex(2)
    @JkTitle("拥有菜单")
    @JkPlaceholder("请选择拥有菜单")
    @JkDataSource(type = JkSourceType.beanClass,beanCls = ChildrenMenuDataSource.class)
    @JkCheckBoxFormField()
    @JkVerify(rules = {JkVerifyType.required})
    private List<String> permissionSet;
}
